﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ProjMin.Utils;
using ProjMin.Forms;
using Oracle.DataAccess.Client;
using Oracle.DataAccess;
namespace ProjMin
{
    public partial class MainFrm : Form
    {
        public MainFrm(){
            InitializeComponent();
        }

        private void buscarProjetosToolStripMenuItem_Click(object sender, EventArgs e){

        }

        private void toolStripButton1_Click(object sender, EventArgs e){
            this.createNewProjWindow();
        }

        private void toolStripButton2_Click(object sender, EventArgs e){
            
        }

        /**
         * Cria uma noja janela MDIChild para cadastro de Projetos
         **/
        private void createNewProjWindow() {
            CadProject l = new CadProject();
            l.MdiParent = this;
            l.MainMenuStrip = mainMdiBar;
            l.Show();       
        }

        /// <summary>
        /// Prepara o form (Cosmética)  
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainFrm_Load(object sender, EventArgs e) {

           this.Text = this.Text + " - " +  Program.mainDb.getKeyValue("system-name");
           // Inicia a tela de login
           LoginWindow lw = new LoginWindow();
           lw.ShowDialog();
        }
    }
}
